package com.stujyh;

public class Test {
    public static void main(String[] args) {
        WeaponFactory tankFactory = Factory.getFactory("TankFactory");
        tankFactory.getWeapon().attack();
        WeaponFactory gunFactory = Factory.getFactory("GunFactory");
        gunFactory.getWeapon().attack();
    }
}